import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import { Tabbar, TabbarItem } from "vant";
import { Tab, Tabs } from "vant";
import { Swipe, SwipeItem } from "vant";
import { Icon } from "vant";
import { NavBar } from "vant";
import { Button } from "vant";
import { Toast } from "vant";
import { Empty } from "vant";
import { Checkbox, CheckboxGroup } from "vant";
import { Form } from "vant";
import { Field } from "vant";
import { Skeleton } from "vant";
import { SwipeCell } from "vant";
import { Popup } from "vant";
import { Cell, CellGroup } from "vant";
import { ActionSheet } from "vant";
import { Search } from "vant";
import { Overlay } from "vant";
import { Dialog } from "vant";
Vue.use(Dialog);
Vue.use(Overlay);
Vue.use(Search);
Vue.use(ActionSheet);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Popup);
Vue.use(SwipeCell);
Vue.use(Skeleton);
Vue.use(Form);
Vue.use(Field);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Empty);
Vue.use(Toast);
Vue.use(Button);
Vue.use(NavBar);
Vue.use(Icon);
import axios from "axios";
Vue.prototype.axios = axios;
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.config.productionTip = false;
Vue.prototype.$bus = new Vue();
router.beforeEach((to, from, next) => {
    if (!to.name) {
        next({ name: "notFound" });
    } else {
        next();
    }
});
new Vue({
    router,
    render: (h) => h(App),
}).$mount("#app");
